package com.chen.manager.controller;

/**
 * @author cgj
 * @date 3/15/25 8:58 AM
 */

import com.chen.manager.service.ProductUnitService;
import com.chen.model.entity.base.ProductUnit;
import com.chen.model.vo.common.Result;
import com.chen.model.vo.common.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 字典表
 */
@RestController
@RequestMapping("/admin/product/productUnit")
public class ProductUnitController {
    @Autowired
    private ProductUnitService productUnitService;
    @GetMapping("")
    public Result<List<ProductUnit>> selectAll(){
        List<ProductUnit> productUnitList=productUnitService.selectAll();
        return Result.build(productUnitList, ResultCodeEnum.SUCCESS);
    }
}
